/**
 * @param {number[]} numbers
 * @return {number}
 */
 var minArray = function(numbers) {
    length=numbers.length;
    let res=numbers[0];
    for(let i=0;i<length;i++){
        if(numbers[i]<res){
            return numbers[i];
        }
    }
    return res;
};
console.log(minArray([2,2,2,0,1]));